<!DOCTYPE html>
<html>
<head>
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?d890b1f16fb364253e79c5bb20225c3a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>


    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?busuanzi_value_site_uv"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    <meta name="baidu-site-verification" content="FYMCShbUK8" />
    <meta name="baidu-site-verification" content="ZYRF7OxQRW" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    <meta name="baidu-site-verification" content="cHSqtjI0PN" />
    
    
    <link rel="canonical" href="https://hhardyy.com/airPlay/HHardyy_PC.html">
    
    
    <title>小方块 - hhardyy.com | 复杂的坑+归其原理+了解实现规则===解决？解决成功：加油解决成功;</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#958e93">
    
    
    <meta name="keywords" content="">
    <meta name="description" content="Document 	 	   	 		 			 		 	 	 		游戏规则： 		左右键分别移动飞机左右运动，a键发射子弹，绿飞机打一次爆炸得一分，蓝飞机打两次爆炸得2分，红飞机打三次爆炸得3分，被飞下来的飞机撞到游戏结束。（暂时只能PC玩） 	   	window.onload=function(){ 	var hhardyy=new Hardy(); 	hhardyy.init()">
<meta property="og:type" content="website">
<meta property="og:title" content="小方块 - hhardyy.com">
<meta property="og:url" content="http://yoursite.com/airPlay/HHardyy_PC.html">
<meta property="og:site_name" content="小方块 - hhardyy.com">
<meta property="og:description" content="Document 	 	   	 		 			 		 	 	 		游戏规则： 		左右键分别移动飞机左右运动，a键发射子弹，绿飞机打一次爆炸得一分，蓝飞机打两次爆炸得2分，红飞机打三次爆炸得3分，被飞下来的飞机撞到游戏结束。（暂时只能PC玩） 	   	window.onload=function(){ 	var hhardyy=new Hardy(); 	hhardyy.init()">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2018-07-25T02:06:19.167Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="小方块 - hhardyy.com">
<meta name="twitter:description" content="Document 	 	   	 		 			 		 	 	 		游戏规则： 		左右键分别移动飞机左右运动，a键发射子弹，绿飞机打一次爆炸得一分，蓝飞机打两次爆炸得2分，红飞机打三次爆炸得3分，被飞下来的飞机撞到游戏结束。（暂时只能PC玩） 	   	window.onload=function(){ 	var hhardyy=new Hardy(); 	hhardyy.init()">
    
        <link rel="alternate" type="application/atom+xml" title="小方块 - hhardyy.com" href="/atom.xml">
    
    <link rel="shortcut icon" href="/hardyfavicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/paulGraham.jpg)">
      <div class="brand" style="background-color:#4154b2">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">BingZhenhuang</h5>
          <a href="mailto:huangbingzhen@hhardyy.com" title="huangbingzhen@hhardyy.com" class="mail">huangbingzhen@hhardyy.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                所有文章
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/HHardyy" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://juejin.im/user/59a26f926fb9a02487553b04"  >
                <i class="icon icon-lg icon-pencil"></i>
                掘金-圳
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://segmentfault.com/u/hhardyy"  >
                <i class="icon icon-lg icon-comments"></i>
                Segmentfault
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://codepen.io/HHardyy/" target="_blank" >
                <i class="icon icon-lg icon-codepen"></i>
                Codepen
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/ZhenSolive/find.html" target="_blank" >
                <i class="icon icon-lg icon-globe"></i>
                原生直播间
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/hero/judge.html" target="_blank" >
                <i class="icon icon-lg icon-cloud"></i>
                原生小悟空
              </a>
            </li>
        
            <li class="waves-block waves-effect active">
              <a href="/airPlay/HHardyy_PC.html" target="_blank" >
                <i class="icon icon-lg icon-camera"></i>
                原生飞机大战（PC）
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://www.freecodecamp.cn/hhardyy" target="_blank" >
                <i class="icon icon-lg icon-leaf"></i>
                Freecodecamp
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/友情链接"  >
                <i class="icon icon-lg icon-link"></i>
                友链
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis"></div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header page-header">

    <div class="container fade-scale">
        <h1 class="title"></h1>
        <h5 class="subtitle">
            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    <article class="page-article fade" itemprop="blogPage">
        <div class="post-content page-content" id="page-content" itemprop="pageContent">
            <!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="icon" href="images/zhenLogo.ico">
	<link rel="stylesheet" href="style/pc.css">
</head>
<body>
	<div class="gameBox">
		<div class="sun">
			<input type="button" class="StartGame" value="Start Game">
		</div>
	</div>
	<div class="sai">
		<h1>游戏规则：</h1>
		左右键分别移动飞机左右运动，a键发射子弹，绿飞机打一次爆炸得一分，蓝飞机打两次爆炸得2分，红飞机打三次爆炸得3分，被飞下来的飞机撞到游戏结束。（暂时只能PC玩）
	</div>
</body>
<script>
	window.onload=function(){
	var hhardyy=new Hardy();
	hhardyy.init();
}

function Hardy(){
	this.oBox=document.querySelectorAll(".gameBox")[0];
	this.oBtn=this.oBox.querySelectorAll(".StartGame")[0];
	this.oSun=this.oBox.querySelectorAll(".sun")[0];

	this.GameData={
	//敌人
    	oEmpty : {
    		'e1':{'style':'enemy1','blood':1,'speed':5,'score':1},
	    	'e2':{'style':'enemy2','blood':2,'speed':7,'score':2},
	    	'e3':{'style':'enemy3','blood':3,'speed':9,'score':3}
	    },

	//关卡
	    checkpoint:[
	    {
		eMap : [
		    'e3','e3','e3','e3','e3','e3','e3','e3','e3','e3',
	    	'e3','e3','e3','e3','e3','e3','e3','e3','e3','e3',
	    	'e3','e3','e3','e3','e3','e3','e3','e3','e3','e3',
	    	'e2','e2','e2','e2','e2','e2','e2','e2','e2','e2',
	    	'e2','e2','e2','e2','e2','e2','e2','e2','e2','e2',
	    	'e2','e2','e2','e2','e2','e2','e2','e2','e2','e2',
	    	'e1','e1','e1','e1','e1','e1','e1','e1','e1','e1',
	    	'e1','e1','e1','e1','e1','e1','e1','e1','e1','e1',
	    	'e1','e1','e1','e1','e1','e1','e1','e1','e1','e1',
		],
	    	colNum : 10,
	    	iSpeedX : 10,
	    	iSpeedY : 10,
	    	times : 2000
	    }
	    ],
	//飞机
	    air : {   
		    style : 'air1',
		    bulletStyle : 'bullet'
	    }
    }
}

Hardy.prototype={
	init(){
		var this_=this;
		this.oBtn.addEventListener("click", function(){
			this_.hiddenFun();
			this_.creatScore();
			this_.creatEnemy(0);
			this_.creatAir();
		}, false);
	},
	hiddenFun(){
		var _this=this;
		this.oSun.style.opacity="0";
		this.oSun.style.transition="all 1s";
		var timer=null;
		timer=setTimeout(function(){
			_this.oSun.style.display="none";
		}, 800)
	},
	//创建积分
	creatScore(){
		var oS=document.createElement("div");
		oS.id='score';
		oS.innerHTML="积分：<span>0</span>";
		this.oBox.appendChild(oS);
		var oSpanNum=oS.querySelectorAll("span")[0];
		this.oSpanNum=oSpanNum;
	},
	//创建敌机
	creatEnemy(iNow){
		if (this.oEnemyBox) {
			clearInterval(this.oEnemyBox.timer);
			this.oBox.removeChild(this.oEnemyBox);
		}
		var arr=[];
		var checkpoint=this.GameData.checkpoint[iNow];
		var oEnemyBox=document.createElement("ul");
		oEnemyBox.id='bee';
		oEnemyBox.style.width=checkpoint.colNum*40+'px';
		this.oBox.appendChild(oEnemyBox);
		oEnemyBox.style.left=(this.oBox.offsetWidth-oEnemyBox.offsetWidth)/2+'px';

		for(var i=0;i<checkpoint.eMap.length;i++){
			var ali=document.createElement("li");
			ali.className=this.GameData.oEmpty[checkpoint.eMap[i]].style;

			ali.blood=this.GameData.oEmpty[checkpoint.eMap[i]].blood;
			ali.speed=this.GameData.oEmpty[checkpoint.eMap[i]].speed;
			ali.score=this.GameData.oEmpty[checkpoint.eMap[i]].score;

			oEnemyBox.appendChild(ali);
		}
		this.oEnemyBox=oEnemyBox;
		this.aLi=oEnemyBox.querySelectorAll('li');
		for(var q=0;q<this.aLi.length;q++){
			arr.push([this.aLi[q].offsetLeft,this.aLi[q].offsetTop]);
		}

		for(var j=0;j<this.aLi.length;j++){
			this.aLi[j].style.position="absolute";
			this.aLi[j].style.left=arr[j][0]+'px';
			this.aLi[j].style.top=arr[j][1]+'px';
		}

		this.runEnemy(checkpoint);
	},
	//敌机移动
	runEnemy(data){
		var This=this;
		var L=0;
		var R=this.oBox.offsetWidth-this.oEnemyBox.offsetWidth;
		this.oEnemyBox.timer=setInterval(function(){
			if (This.oEnemyBox.offsetLeft>R) {
				data.iSpeedX*=-1;
				This.oEnemyBox.style.top=This.oEnemyBox.offsetTop+data.iSpeedY+'px';
			}else if(This.oEnemyBox.offsetLeft<=L){
				data.iSpeedX*=-1;
				This.oEnemyBox.style.top=This.oEnemyBox.offsetTop+data.iSpeedY+'px';
			}
			This.oEnemyBox.style.left=This.oEnemyBox.offsetLeft+data.iSpeedX+'px';
		}, 1000)

		setInterval(function(){
			This.oneEnmyRun();
		},data.times);
	},
	//单个敌机乱飞
	oneEnmyRun(){
		var nowLi=this.aLi[Math.floor(Math.random()*this.aLi.length)];
		var This=this;
		nowLi.timer=setInterval(function(){
			var a=(This.oAir.offsetLeft+This.oAir.offsetWidth/2)-(nowLi.offsetLeft+This.oEnemyBox.offsetLeft+This.oAir.offsetWidth/2);
			var b=(This.oAir.offsetTop+This.oAir.offsetHeight/2)-(nowLi.offsetTop+This.oEnemyBox.offsetTop+This.oAir.offsetHeight/2);
			var c=Math.sqrt(a*a+b*b);

			var iSx=nowLi.speed*a/c;
			var iSy=nowLi.speed*b/c;

			nowLi.style.left=nowLi.offsetLeft+iSx+'px';
			nowLi.style.top=nowLi.offsetTop+iSy+'px';

			if (This.collisionEnmy(This.oAir,nowLi)) {
				This.oSun.style.display="block";
				window.location.reload();
			}
		},30);
	},
	//创建小飞机
	creatAir(){
		var oAir=document.createElement("div");
		oAir.className=this.GameData.air.style;
		this.oBox.appendChild(oAir);

		oAir.style.left=(this.oBox.offsetWidth-oAir.offsetWidth)/2+'px';
		oAir.style.top=this.oBox.offsetHeight-oAir.offsetHeight+'px';
        this.oAir=oAir;
		this.runAir();
	},
	//操作飞机
	runAir(){
		var This=this;
		var timer=null;
		var iNumber=0;

		document.addEventListener('keydown',function(ev){
			if (!timer) {
				timer=setInterval(show, 30);
			}
			var ev=ev||window.event;
			if (ev.keyCode==37) {
				iNumber=1;
			}else if(ev.keyCode==39){
				iNumber=2;
			}
		},false)

		document.addEventListener('keyup',function(ev){
			var ev=ev||window.event;
			clearInterval(timer);
			timer=null;
			iNumber=0;

			if (ev.keyCode==65) {
				This.creatBoom();
			}
		},false)

		function show(){
			if (iNumber==1) {
				This.oAir.style.left=This.oAir.offsetLeft-10+'px';
			}else if (iNumber==2) {
				This.oAir.style.left=This.oAir.offsetLeft+10+'px';
			}
		}
	},
	//创建子弹
	creatBoom(){
		var boom=document.createElement('div');
		boom.className=this.GameData.air.bulletStyle;
		this.oBox.appendChild(boom);
		boom.style.left=this.oAir.offsetLeft+this.oAir.offsetWidth/2+'px';
		boom.style.top=this.oAir.offsetTop-boom.offsetHeight+'px';
		this.runBoom(boom);
	},
	//子弹运动
	runBoom(obj){
		var This=this;
		obj.timer=setInterval(function(){
			if (obj.offsetTop<-obj.offsetHeight) {
				clearInterval(obj.timer);
				This.oBox.removeChild(obj);
			}else{
				obj.style.top=obj.offsetTop-obj.offsetHeight+'px';
			}
			
			for(var i=0;i<This.aLi.length;i++){
				if (This.collisionEnmy(obj,This.aLi[i])) {
					if (This.aLi[i].blood==1) {
						clearInterval(This.aLi[i].timer);
						This.oSpanNum.innerHTML=Number(This.oSpanNum.innerHTML)+This.aLi[i].score;
						This.oEnemyBox.removeChild(This.aLi[i]);
					}else{
						This.aLi[i].blood--;
					}
					clearInterval(obj.timer);
					This.oBox.removeChild(obj);
				}
			}
		},30)
	},
	//子弹与敌机碰撞
	collisionEnmy(obj1,obj2){
		var l1 = obj1.offsetLeft;
		var r1 = obj1.offsetLeft + obj1.offsetWidth;
		var t1 = obj1.offsetTop;
		var b1 = obj1.offsetTop + obj1.offsetHeight;
		
		var l2 = obj2.offsetLeft + this.oEnemyBox.offsetLeft;
		var r2 = obj2.offsetLeft + obj2.offsetWidth + this.oEnemyBox.offsetLeft;
		var t2 = obj2.offsetTop + this.oEnemyBox.offsetTop;
		var b2 = obj2.offsetTop + obj2.offsetHeight + this.oEnemyBox.offsetTop;
		
		if( r1<l2 || l1>r2 || b1<t2 || t1>b2 ){
			return false;
		}
		else{
			return true;
		}
	}
}
</script>
</html>
        </div>

        
        <div class="card page-about-me flex-row">
            <a href="/" class="avatar waves-effect waves-circle waves-light"><img src="/img/avatar.jpg"></a>
            <div class="content flex-col">
                <p><strong>BingZhenhuang</strong></p>
                <p><em>复杂的坑+归其原理+了解实现规则===解决？解决成功：加油解决成功;</em></p>
                <p>true</p>
            </div>

            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/airPlay/HHardyy_PC.html&title=小方块 - hhardyy.com&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/airPlay/HHardyy_PC.html&title=小方块 - hhardyy.com&source=IT技术分享" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/airPlay/HHardyy_PC.html" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=小方块 - hhardyy.com&url=http://yoursite.com/airPlay/HHardyy_PC.html&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/airPlay/HHardyy_PC.html" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
        

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        














    </article>
    
<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        🤠 请我喝可乐！
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content" style="width:50%">
        
        <div class="reward-code" style="text-align:center">
            <div style="width:300px;margin:0px auto;">
               <img id="rewardCode" style="width:50%;height:60%;display:block; margin:0px auto;" src="/img/alipay.jpg" alt="支付宝打赏二维码">
               <span style="display:inline-block; margin-bottom:20px;">0.88(支付宝 aliPay)</span>
               <img id="rewardCode" style="width:50%;height:60%;display:block; margin:0px auto;" src="/img/wechat.jpg" alt="微信打赏二维码">
               <span style="display:inline-block;">0.88(微信 weChat)</span>
            </div>
        </div>
    </div>
</div>


</div>

        <script>
!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e<d.length;e++)d[e].alpha<=0?(t.body.removeChild(d[e].el),d.splice(e,1)):(d[e].y--,d[e].scale+=.004,d[e].alpha-=.013,d[e].el.style.cssText="left:"+d[e].x+"px;top:"+d[e].y+"px;opacity:"+d[e].alpha+";transform:scale("+d[e].scale+","+d[e].scale+") rotate(45deg);background:"+d[e].color+";z-index:99999");requestAnimationFrame(r)}function o(){var t="function"==typeof e.onclick&&e.onclick;e.onclick=function(e){t&&t(),i(e)}}function i(e){var a=t.createElement("div");a.className="heart",d.push({el:a,x:e.clientX-5,y:e.clientY-5,scale:1,alpha:1,color:s()}),t.body.appendChild(a)}function c(e){var a=t.createElement("style");a.type="text/css";try{a.appendChild(t.createTextNode(e))}catch(t){a.styleSheet.cssText=e}t.getElementsByTagName("head")[0].appendChild(a)}function s(){return"rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"}var d=[];e.requestAnimationFrame=function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)}}(),n()}(window,document);
</script>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
    function secondToDate(second) {
        if (!second) {
            return 0;
        }
        var time = new Array(0, 0, 0, 0, 0);
        if (second >= 365 * 24 * 3600) {
            time[0] = parseInt(second / (365 * 24 * 3600));
            second %= 365 * 24 * 3600;
        }
        if (second >= 24 * 3600) {
            time[1] = parseInt(second / (24 * 3600));
            second %= 24 * 3600;
        }
        if (second >= 3600) {
            time[2] = parseInt(second / 3600);
            second %= 3600;
        }
        if (second >= 60) {
            time[3] = parseInt(second / 60);
            second %= 60;
        }
        if (second > 0) {
            time[4] = second;
        }
        return time;
    }</script>
<script type="text/javascript" language="javascript">
    function setTime() {
        var create_time = Math.round(new Date(Date.UTC(2017, 08, 18, 11, 42, 23)).getTime() / 1000);
        var timestamp = Math.round((new Date().getTime() + 8 * 60 * 60 * 1000) / 1000);
        currentTime = secondToDate((timestamp - create_time));
        currentTimeHtml = 'Running：' + currentTime[0] + '年 ' + currentTime[1] + '天 '
                + currentTime[2] + '时 ' + currentTime[3] + '分 ' + currentTime[4]
                + '秒';
        document.getElementById("htmer_time").innerHTML = currentTimeHtml;
    }    setInterval(setTime, 1000);
</script>
<footer class="footer">
    <div class="top">
        

        <p>
          <span id="busuanzi_container_page_pv">
             [&nbsp;浏览量：&nbsp;<span id="busuanzi_value_page_pv"></span>&nbsp;]
          </span>
        </p>
    </div>
    <div class="bottom">
        <p>
        <span>BingZhenhuang &copy; 2017 - 2020</span>
            <span>
                
                Power by <a href="https://hhardyy.github.io/" target="_blank">zhen On August 8</a> 
            </span>
            <span id="htmer_time" "></span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/airPlay/HHardyy_PC.html&title=小方块 - hhardyy.com&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/airPlay/HHardyy_PC.html&title=小方块 - hhardyy.com&source=IT技术分享" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/airPlay/HHardyy_PC.html" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=小方块 - hhardyy.com&url=http://yoursite.com/airPlay/HHardyy_PC.html&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/airPlay/HHardyy_PC.html" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>








<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '(•‾̑⌣‾̑•)✧˖°回来看我';
            clearTimeout(titleTime);
        } else {
            document.title = '(゜-゜)つロ欢迎回来';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
